<template>
  <div>
    <a-drawer
      :width="966"
      :visible="show"
      @ok="handleOk"
      @cancel="handleCancel"
      unmountOnClose
    >
      <template #title> 选择链接 </template>

      <div v-auto-animate>
        <chooseFunctionArticle
          key="645654sd"
          @selectTableChange="callback"
          :functionCode="props.functionCode"
        ></chooseFunctionArticle>
      </div>
    </a-drawer>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import chooseFunctionArticle from './choose-function-article.vue'

import { onMounted } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const emit = defineEmits(['callback'])

const pageClientType = ref<string>('')

// import { DragRule } from '@/views/operation/decoration/app/models/types';
const props = defineProps<{
  // res?: any
  functionCode: string
}>()

onMounted(() => {})

const show = ref(false)
const open = () => {
  show.value = true
}
defineExpose({ open })

// 选值回调
function callback(val: any) {
  emit('callback', val)
}

const handleOk = () => {
  show.value = false
}
const handleCancel = () => {
  show.value = false
}
</script>

<style scoped></style>
